﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>
 <script type="text/javascript">
		//编辑器内容检查	
		function checkEditor(){
			//通过javascript	代码读取编辑器中的内容	
			var editor_data = CKEDITOR.instances.editor1.getData();
			if (editor_data==''){
				alert("编辑器内容不能为空,请输入具体内容然后再提交!");
				return false;
			}else return true;
		}
	</script>  
</head>

<body>
	<s:form action="saveNote" method="post" onsubmit="return checkEditor();">
		<s:textfield name="note_title" label="标题" />
		<textarea id="editor1" name="note_context" class="ckeditor" cols="80"  rows="10"></textarea>
			<script type="text/javascript">
			   CKEDITOR.replace('editor1',{
				   filebrowserImageUploadUrl:'./fileUpload?type=image',
				   filebrowserFlashUploadUrl:'./fileUpload?type=flash'
			   });
			  
			</script>
		
		<s:submit value="保存"/>
	</s:form>
		

		
		
      
		

	
</body>
</html>
